package simple_factory_pattern.v4;

public class DivOperation extends Operation {
    @Override
    public double getResult() {
        if (numberB == 0) {
            throw new RuntimeException("除数不能为0！");
        }
        return numberA / numberB;
    }
}
